<template>
	<view class="">
		<view @click="openPopup(item)" class="setBasestyle setBgfff setRadius setPadding resultBox"
			v-for="(item,index) in personMsg" :key="index">
			<view class="sethorizontalbetween">
				<view class="setVerticalCenter">
					<text class="headImg setRadiusBlock setNowrap1 setFont">{{item.name}}</text>
					<view class="setFont setNowrap2" v-html="item.companyHumanName"></view>
				</view>
				<view class="">
					<text>性别:{{item.companySex}}</text>
				</view>
			</view>
			<view class="sethorizontalbetween">
				<view class="setMarginHorizontal" style="margin-left: 90rpx;">
					<text>{{item.companyCardType=='-'?'居民身份证':item.companyCardType}}:</text>
					<text>{{item.companyCardNum}}</text>
				</view>
			</view>
		</view>
		<u-popup :show="show" :round="10" mode="center" @close="show=false" length="auto" :safe-area-inset-bottom="false">
			<view class="setPadding" style="width: 670rpx;">
				<uni-swiper-dot :info="currentMsg.companyRegInfo" :current="current" field="content" mode="indexes">
					<swiper class="swiper-box" @change="change">
						<swiper-item v-for="(item,index) in  currentMsg.companyRegInfo" :key="index">
							<view class="swiper-item setPadding">
								<view class="setVerticalCenter setMarginVertical "
									style="line-height: 30rpx;height: 30rpx;">
									<view class="setNowrap1">注册类别/专业：</view>
									<view class="setNowrap2 setFont" v-html="item.companyRegisterType"></view>
								</view>
								<view class="sethorizontalbetween ">
									<view class="setVerticalCenter  ">
										<text> 有效期：</text>
										<text>{{item.companyEffectiveTime}}</text>
									</view>
								</view>
								<view class="sethorizontalbetween ">
									<view class="setVerticalCenter  setwarp">
										<text> 注册号（执业印章号）</text>
										<text class="setMiniFont">：{{item.companyPracticeSealNo}}</text>
									</view>
								</view>
								<view  @click="toEnterprise(item.companyRegisterCompanyId)" class=" setVerticalCenter ">
									<view class="setNowrap1 setVerticalCenter">
										<text style="font-size: 55rpx; color: #19be6b;"
											class="iconfont iconwodeqiye"></text>注册公司：
									</view>
									<view class="setNowrap2 setcolor">
										<view class="" v-html="item.companyRegisterCompany">
										</view>
									</view>
								</view>
							</view>
						</swiper-item>
					</swiper>
				</uni-swiper-dot>
			</view>

			<!-- <view class="setDisplayCenter setPadding " style="position: relative;" @click="show=false">
				<zero-loading type="bounce" position="absolute"></zero-loading>
			</view> -->
		</u-popup>
	</view>
</template>

<script>
	export default {
		props: {
			personMsg: {
				type: Array,
				Array: []
			}
		},
		data() {
			return {
				current: 0,

				show: false,
				// 存储当前信息
				currentMsg: {
					companyRegInfo: ''
				}

			}
		},

		methods: {
			change(e) {
				this.current = e.detail.current;
			},
			// 跳转至企业详情
			toEnterprise(item) {
				uni.navigateTo({
					url: `/pagesFind/detailenterprise/detailenterprise?companyCid=${item}`
				})
			},
			openPopup(item) {
				console.log("++++++++++++++++++", item)
				this.currentMsg = item
				this.show = true
			}
		}
	}
</script>

<style>

</style>
